ACHTUNG: nur noch Python 3.8.* ist noch kompatibel mit Windows 7
https://redmine.prodat-sql.de/issues/15870 > Python4Delphi
https://redmine.prodat-sql.de/issues/17215 > Pyhton und Windows 7
https://redmine.prodat-sql.de/issues/17026 > Python LoadLibrary



Download          :  https://www.python.org/downloads/windows/
                     -> "Windows embeddable package (32-bit)", da Delphi&Prodat als Win32
                     https://www.python.org/ftp/python/3.8.10/python-3.8.10-embed-win32.zip

aktuelle Version  : Python 3.8.10 Embedded 32-bit

Python-UPGRADE    : aktuelles siehe "Download"
                    ins DIESES Verzeichnis "Python3" entpacken
                    Kann alles gelöscht/überschrieben werden, siehe "restliche *.pyd"
                    ABER in der python**._pth die Suchpfade beachten, siehe "python38._pth"
                    "Prodat sucht" prüfen
                    und zuletzt siehe "python pip.pyz"

                    LÖSCHEN: charset_normalizer\md.cp38-win32.pyd und charset_normalizer\ md__mypyc.cp38-win32.pyd
                       werden durch PIP in den Download eingefügt und führen zu Problemen.
                       https://www.delphipraxis.net/1524779-post6.html

Prodat sucht die aktuellste python3**.dll, siehe TProdatPython.FindPythonDLL (UProdatPython)

SourceCode der Python**.dll  -> https://github.com/python/cpython  -> \Include\pylifecycle.h



[[ Anleitung PIP : Package Installer for Python ]]

Installation siehe "pip.pyz"
Explorer > Prodat-Verzeichnis\Python3
in Adressleiste : CMD [Enter]

python pip.pyz help                      Hilfe
python pip.pyz list                      Liste des Installierten
python pip.pyz search                    Suchen : geht nicht mehr, aber siehe https://pypi.org/search bzw. https://pypi.org/classifiers/

python pip.pyz install <modulname>       Installieren
python pip.pyz uninstall <modulname>     Deinstallieren
python pip.pyz show <modulname>          Infos: Abhängigkeiten, Version, Beschreibung, Quelle usw.

python pip.pyz check                     Abhängigkeiten prüfen



[[ Einiges vom Verzeichnisinhalt des "Python3" ]]

python.exe         = nutzen wir im Prodat nicht (aber für PIP oder z.B. manuelles Ausführen der DebugBackup-Datei *.py aus Prodat)
python3.dll        = Forward-DLL mit Weiterleitung zur jeweiligen python3*.dll
python38._pth      = Python-Config : Suchpfade und optional ein InitialScript
                         "python38.zip" , "." und unser Zusatz für's PIP "Lib\site-packages" , sowie ein "Addons"
python38.dll       = [Version 3.8.10]   das Python
python38.zip       = [Version 3.8.10]   viele StandardModule (os, io, datetime, zip, base64, xml, json, csv, email, ...)
                   = ist ein site-package (wird über python39._pth geladen) und enthält viele *.pyc (compiled bytecode)
                         diese können ebenfalls in den eigenen Scripten genutzt werden
*.pyd              = vorkompilierte Python-Module (DLLs), zur Nutzung innerhalb der Scripte
*.pyc              = kompiliertes Python-Script
*.py               = Python-Script
*.pyz              = Python Zipped Executable ist wohl sowas Ähnliches wie *.pyd

restliche *.pyd    = stammen aus der python-3.8.10-embed-win32.zip, also ebenfalls Standard-Zeugs, wie die python38.zip
                     -> bis auf DIESE Info-Datei, bzw. die Versions-Info, die "pip.pyz" und unsere angepasste "python38._pth"

__pycache__\       = [gitignore] Cache der Python-EXE/DLL (kompilierte *.pyc der *.py)

Addons\            = Zusätzliche Scripte von uns (siehe Nachfolgend "Addons")
Lib\site-packages\ = Python-Module via PIP installiert
Scripts\           = Tools vom PIP

pip.pyz            = [Version 3.6]      Package Installer for Python - der Paketmanager (siehe "Anleitung PIP")
                                                               Quelle:     https://pip.pypa.io/en/stable/installation/#get-pip-py
                                        [als Python-Anwendung] Download:   https://bootstrap.pypa.io/pip/pip.pyz
                                                               muß ins Hauptverzeichnis, geht nicht aus .\Addons\
                                                               "CMD: python.exe pip.pyz <command> <params>"
                                        [als Python-Modul]     Alternativ: https://bootstrap.pypa.io/get-pip.py
                                                               dieses runterladen und installieren "python.exe get-pip.py"
                                                               landet im .\Lib\site-packages\
                                                               "CMD: python.exe -m pip <command> <params>"

[[ aus Addons und Lib\site-packages ]]

prodat             = [VIRTUELL]         Funktionen direkt im PRODAT (durchgereichte Delphi-Funktionen der TProdatPython-Implementierung)
MPySqlParse.py     =                    unser PRODAT-Zeugs, vor allem für den SQL-Zusammenbau, siehe Kommentare im Script

nexarClient.py     = [Version ???]      Getting Nexar tokens for Python
                                        angepasste Version von uns (Phillp Wolak)
                                        vermutlich von https://github.com/NexarDeveloper/nexar-first-supply-query/tree/main/python/SupplyQueryDemo

requests           = [Version 2.31.0]   HTTP for Humans (Requirements der nexarClient.py)

split.py           = [Version 0.4]      (Requirements des Modul "requests" usw.)  split ließ sich nicht via PIP installieren, aber ist von dort https://pypi.org/project/split/
urllib3              [Version 2.0.3]    ...
idna                 [Version 3.4]      .
charset_normalizer   [Version 3.2.0]    .
certifi              [Version 2023.5.7] .
